﻿#ifndef _FITK_CCX_ADAPTOR_PART_H___
#define _FITK_CCX_ADAPTOR_PART_H___


#include "FITKCCXAbstractAdaptor.h"
#include "FITKCCXModelInforManager.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

namespace AbaqusData
{
    class FITKAbaqusPart;
}


namespace IO
{
    class FITKCCXAdaptorPart : public FITKCCXAbstractAdaptor
    {
    public:
        explicit FITKCCXAdaptorPart() = default;
        virtual  ~FITKCCXAdaptorPart() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author XuChao (xxu715737@163.com)
         * @date   2024-05-30
         */
        QString getAdaptorClass() override;

        /**
       * @brief 适配器读取
       * @return 状态 true成功， false失败
       * @author fulipeng (fulipengqd@yeah.net)
       * @date 2024-03-15
       */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author XuChao (xxu715737@163.com)
         * @date   2024-05-30
         */
        bool adaptW() override;


    private:
        bool readNode(AbaqusData::FITKAbaqusPart* mesh,  const QString& setName);

        bool readElement(AbaqusData::FITKAbaqusPart* mesh, const QString& setName, const QString &eleType);
    };
    Register2FITKIOAdaptorFactory(CCXINP, AbaqusData::FITKAbaqusPart, FITKCCXAdaptorPart);
}


#endif
